git and how can I use it?gitVersion control:
Tools ➤ Global Options ➤ Git/SVN.
Make sure the first box is ticked and the “git.exe” (Windows) is included in the first box.
git config --global user.email "myemail@email.com" git config --global user.name "My commit name"
File ➤ New Project ➤ Version Control ➤ Git
.gitignore file.gitignore file specifies a pattern.git add .gitignore myfirstrepo.Rproj
git can do autocomplete for file names!git add and git commit (next step).git add .gitignore myfirstrepo.Rproj git commit -am "My first commit"
Commits always have a commit message.
git add .gitignore myfirstrepo.Rproj git commit -am "My first commit" git push
Congrats! You have done it! Now local and remote repositories are up to date!
Before you start working on the project the next time:
git pull
Pull, work some more, repeat.
git diff
First things first: You cannot break things.
Read the output!
I don’t really have time to get into this
Additional info (in the material folder):
Vuorre, M., & Curley, J. P. (2018). Curating Research Assets: A Tutorial on the Git Version Control System. Advances in Methods and Practices in Psychological Science, 1(2), 219–236.